<%@ Page Language="c#" MasterPageFile="~/SQLWebQuery.master" Title="SQL Web Query"
    Inherits="SqlWebAdmin.databases" CodeFile="Databases.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr>
            <!--BEGIN ONE LINE-->
            <td valign="bottom" colspan="2" height="8" width="100%">
                <img src="images/spacer.gif" width="1" height="8" alt="" border="0"></td>
            <!--END ONE LINE-->
        </tr>
        <tr>
            <!--BEGIN ONE LINE-->
            <td align="left" width="12">
                <img src="images/spacer.gif" width="12" height="1" alt="" border="0"></td>
            <!--END ONE LINE-->
            <td align="left" class="databaseListItem" width="100%">
                <!-- PAGE CONTENT: START -->
                <!-- SECTION HEADER: START -->
                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                    <tr>
                        <td class="databaseListHeader">
                            DATABASES
                        </td>
                    </tr>
                    <!-- SECTION HEADER: END -->
                    <!-- SECTION: START -->
                    <tr>
                        <!--BEGIN ONE LINE-->
                        <td height="3" valign="center" background="images/blue_dotted_line.gif">
                            <img src="images/blue_dotted_line.gif" width="150" height="3" alt="" border="0"></td>
                        <!--END ONE LINE-->
                    </tr>
                    <tr>
                        <!--BEGIN ONE LINE-->
                        <td height="4" valign="center">
                            <img src="images/spacer.gif" width="1" height="4" alt="" border="0"></td>
                        <!--END ONE LINE-->
                    </tr>
                    <tr>
                        <td bgcolor="white" class="databaseListItem">
                            <table width="100%" cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    <td align="right">
                                        Choose a database to query:
                                    </td>
                                </tr>
                            </table>
                            <br>
                            <asp:DataGrid ID="DatabasesDataGrid" runat="server" GridLines="None" Border="0" AutoGenerateColumns="False"
                                Width="100%" CellPadding="4" ForeColor="#333333">
                                <HeaderStyle CssClass="tableHeader" BackColor="#5D7B9D" Font-Bold="True" ForeColor="White"></HeaderStyle>
                                <ItemStyle CssClass="tableItems" BackColor="#F7F6F3" ForeColor="#333333"></ItemStyle>
                                <Columns>
                                    <asp:TemplateColumn HeaderText="Name">
                                        <HeaderStyle Wrap="False"></HeaderStyle>
                                        <ItemStyle Wrap="False"></ItemStyle>
                                        <ItemTemplate>
                                            <a href='<%# String.Format("QueryDatabase.aspx?database={0}", DataBinder.Eval(Container.DataItem, "encodedname")) %>'>
                                                <img src="images/db_ico.gif" border="0" align="absmiddle"></a> &nbsp;
                                            <asp:HyperLink ID="Hyperlink1" runat="server" Text='<%# "&amp;nbsp;" + DataBinder.Eval(Container.DataItem, "name") %>'
                                                CssClass="databaseListBlack" NavigateUrl='<%# String.Format("QueryDatabase.aspx?database={0}", DataBinder.Eval(Container.DataItem, "encodedname")) %>' />
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                    <asp:BoundColumn DataField="size" HeaderText="Size" DataFormatString="{0}">
                                        <HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
                                        <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
                                    </asp:BoundColumn>
                                    <asp:TemplateColumn HeaderText="Query">
                                        <HeaderStyle Wrap="False" HorizontalAlign="Right"></HeaderStyle>
                                        <ItemStyle Wrap="False" HorizontalAlign="Right"></ItemStyle>
                                        <ItemTemplate>
                                            <asp:HyperLink ID="QueryDatabase" runat="server" Text="query" CssClass="databaseListAction"
                                                NavigateUrl='<%# String.Format("querydatabase.aspx?database={0}", DataBinder.Eval(Container.DataItem, "encodedname")) %>'>
                                            </asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateColumn>
                                </Columns>
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <EditItemStyle BackColor="#999999" />
                                <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                            </asp:DataGrid>
                        </td>
                    </tr>
                    <!-- Section END -->
                    <!-- Section Footer START -->
                </table>
                <br>
                <!-- Section Footer END -->
                <!-- Page content END -->
            </td>
        </tr>
    </table>
</asp:Content>